package net.mysoft.budgetsoft.system.dao.impl;

import java.util.List;

import org.hibernate.SQLQuery;
import org.hibernate.transform.Transformers;
import org.springframework.stereotype.Repository;

import net.mysoft.budgetsoft.system.dao.ToDoInfoDao;
import net.mysoft.framework.base.BaseDaoImpl;
@Repository("toDoInfoDao")
public class ToDoInfoDaoImpl extends BaseDaoImpl implements ToDoInfoDao {

	public List queryByCallProc(String proc,String userNo ){
		SQLQuery sqlQuery = this.getCurrentSession().createSQLQuery("{call " + proc + "(?)}");
	    sqlQuery.setString(0, userNo);
		//sqlQuery.setString(1, menuId);
		//sqlQuery.setString(2, toolbarsXML);
		sqlQuery.executeUpdate();
		List<Object[]> list=sqlQuery.setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP).list();
		return list;
	}
	}
	
